package edu.unr.cater.npap.server.locator;

import com.google.web.bindery.requestfactory.shared.Locator;
import edu.unr.cater.npap.client.domain.ReferenceDocument;
import org.springframework.roo.addon.gwt.RooGwtLocator;
import org.springframework.stereotype.Component;

@RooGwtLocator("edu.unr.cater.npap.client.domain.ReferenceDocument")
@Component
public class ReferenceDocumentLocator extends Locator<ReferenceDocument, Integer> {

    public ReferenceDocument create(Class<? extends edu.unr.cater.npap.client.domain.ReferenceDocument> clazz) {
        return new ReferenceDocument();
    }

    public ReferenceDocument find(Class<? extends edu.unr.cater.npap.client.domain.ReferenceDocument> clazz, Integer id) {
        return ReferenceDocument.findReferenceDocument(id);
    }

    public Class<edu.unr.cater.npap.client.domain.ReferenceDocument> getDomainType() {
        return ReferenceDocument.class;
    }

    public Integer getId(ReferenceDocument referenceDocument) {
        return referenceDocument.getDocId();
    }

    public Class<java.lang.Integer> getIdType() {
        return Integer.class;
    }

    public Object getVersion(ReferenceDocument referenceDocument) {
        return referenceDocument.getVersion();
    }
}
